package club.calong.sanniu.pojo;
// 团   队: 风讯网络
// 后   端: Dopa
// 开发时间: 2021/7/25 15:02

import club.calong.sanniu.pojo.type.StringListConverter;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

@TableName("section")
public class Section {

    public static final String TYPE = "type";

    @TableId(value = "id", type = IdType.AUTO)
    Integer id;
    String section;
    Integer type;

    @TableField(value = "sub_section",typeHandler = StringListConverter.class)
    List<String> subSection;

    public Section(Integer id, String section, List<String> subSection) {
        this.id = id;
        this.section = section;
        this.subSection = subSection;
    }

    public Section() { }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSection() {
        return section;
    }

    public void setSection(String section) {
        this.section = section;
    }

    public List<String> getSubSection() {
        return subSection;
    }

    public void setSubSection(List<String> subSection) {
        this.subSection = subSection;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "Section{" +
                "id=" + id +
                ", section='" + section + '\'' +
                ", subSection=" + subSection +
                '}';
    }
}

